import request from "@/netword/request";


const fun = {};


// 分页查询所有信息
fun.getList = async (message) => {
    const res = await request({
        url: "/a/content/message/list",
        method: "post",
        params: {
            userName: message.userName,
            pageNo: message.pageNo,
            pageSize: message.pageSize,
        }
    })
    return res.data;
}







//修改数据状态（正常，停用，删除）
fun.saveStatus = async (id,status) => {
    const res = await request({
        url: "/a/content/message/updateStatus",
        method: "post",
        params: {
            id: id,
            status:status
        }
    })
    return res.data;
}


//查询单条数据
fun.getMessage = async (id) => {
    const res = await request({
        url: "/a/content/message/get",
        method: "get",
        params: {
            id: id
        }
    })
    return res.data;
}


export default fun;